/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package andrapp.prueba.pantalla;

import andrapp.prueba.MainActivity;
import andrapp.prueba.R;
import android.view.View;
import android.widget.Button;

/**
 *
 * @author Chema
 */
public class PantallaPrincipal {

    Button botonAñadir;
    Button btabla1;

    public PantallaPrincipal(MainActivity activity) {

        final MainActivity act = activity;
        botonAñadir = (Button) activity.findViewById(R.id.anadirTabla);
        btabla1 = (Button) activity.findViewById(R.id.tabla1);
        
       
            
            botonAñadir.setOnClickListener(new View.OnClickListener() {

                public void onClick(View arg0) {
                    act.cambiarAAñadirTabla();
                }
            });

            btabla1.setOnClickListener(new View.OnClickListener() {

                public void onClick(View arg0) {
                    
                    act.cambiarAOpcionesTabla();
                    
                }
            });
            
        
        }

    

    public Button getBotonAñadir() {
        return botonAñadir;
    }

    public void setBotonAñadir(Button botonAñadir) {
        this.botonAñadir = botonAñadir;
    }
}
